/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.alxbrendmaquinarias.util;

/**
 *
 * @author jorge
 */
public class ValidateUtil {
    
    public static boolean isString(String str)
    {
        boolean flag=false;
        if(str==null)
        {
            flag=true;
        }else if(str.trim().length()==0){
            flag=true;
        }else{
            flag=false;
        }
        return flag;
    }
    
    public static boolean isDouble(Double number)
    {
        boolean flag = false;
        if(number == null)
        {
            flag = true;
        }else if(number<1){
            flag = true;
        }else{
            flag = false;
        }
        return flag;
    }
    
    public static boolean isInteger(Integer number)
    {
        boolean flag = false;
        if(number == null)
        {
            flag = true;
        }else if(number<1){
            flag = true;
        }else{
            flag = false;
        }
        return flag;
    }
    
    
}
